<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:include="include :: header"></head>
<link rel="stylesheet" href="/css/common/edit.css">
<body>
<form class="layui-form">
    <input type="hidden" name="id" th:value="${menu.id}">
    <div class="layui-form-item">
        <label class="layui-form-label">id</label>
        <label class="layui-form-label" style="text-align: left;" th:text="${menu.id}"></label>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">名称</label>
        <div class="layui-input-inline" style="width: 120px;">
            <input type="text" class="layui-input" name="name" th:value="${menu.name}"
                   lay-verify="required" placeholder="请填写">
        </div>
        <label class="layui-form-label">图标</label>
        <div class="layui-input-inline" style="width: 290px;">
            <input type="text" class="layui-input" name="icon" id="icon_picker"
                   th:value="${menu.icon}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">类型</label>
        <div class="layui-input-block" style="width: 100px;">
            <select name="type">
                <option th:each="item : ${menuTypeData}"
                        th:value="${item.value}" th:text="${item.key}"
                        th:selected="${item.value} == ${menu.type}">
                </option>
            </select>
        </div>
    </div>
    <div class="layui-form-item" th:if="${menu.id > 1}">
        <label class="layui-form-label">上级菜单</label>
        <div class="layui-input-block">
            <div id="classTree" style="width: 200px;"></div>
            <input type="hidden" name="parentId" th:value="${menu.parentId}"/>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">资源 路径</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input" name="url"
                   style="width: 300px;" placeholder="请填写"
                    th:value="${menu.url}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">权限 标识</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input" name="permsName"
                   style="width: 200px;"  placeholder="请填写"
                    th:value="${menu.permsName}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">排序</label>
        <div class="layui-input-inline" style="width: 100px;">
            <input type="number" class="layui-input" name="order" lay-affix="number"
                   value="1" min="1"
                    th:value="${menu.order}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">状态</label>
        <div class="layui-input-block" style="width: 120px;">
            <select name="markStatus">
                <option th:each="item : ${markStatusData}"
                        th:value="${item.value}" th:text="${item.key}"
                        th:selected="${item.value} == ${menu.markStatus}">
                </option>
            </select>
        </div>
    </div>
    <div class="layui-form-item layui-fixbar btn-fixbar-box">
        <div class="layui-input-block">
            <button type="submit" class="layui-btn" lay-submit lay-filter="btn-submit">提交</button>
            <button type="button" class="layui-btn layui-btn-primary" lay-on="close">
                <i class="layui-icon layui-icon-close"></i>关闭
            </button>
        </div>
    </div>
</form>
</body>
<div th:include="include :: footer"></div>
<script src="/js/system/menu/edit.js"></script>
</html>